<template>
  <div>
    首页
    <input type="button" value="登录" @click="go('/login')" />
    <input type="button" value="注册" @click="go('/reg')" />
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },

  components: {},

  methods: {
    //功能：跳转页面
    go(path) {
      //编程式导航
      this.$router.push(path);
    },
  },
};
</script>

<style scoped></style>
